/**
*  \file interpol_s16_s16.h
*
*  \brief Linear interpolation module for S16 input and output.
*
*  \author  Michael J. Hohmann  <michael.hohmann@linde-mh.de>
*
*
*/

#ifndef INTERPOL_S16_S16_H_INCLUDED
#define INTERPOL_S16_S16_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "..\cfg\prj.h"

/*================================================[ public defines   ]================================================*/
/** Object definition.
*
* The struct interpol_s16_s16_object defines the attribute of an object.
*/
struct interpol_s16_s16_obj
{
   pal_size_t count; 	/**< Number of data points of the curve */
   S16 const* x;        /**< Pointer to an array of x values */
   S16 const* y;  		/**< Pointer to an array of y values */
};
/*================================================[ public datatypes ]================================================*/

/*================================================[ public variables ]================================================*/

/*================================================[ public functions ]================================================*/

/** Interpolation.
*
*  Perform a linear interpolation of a table with 16 bit signed nodes of arbitrarily size.
*  The values of the x-nodes have to be in ascending order.
*
*  \param me pointer to a struct which contains the table information.
*  \param value The X-Value we want retrieve an interpolated y-value.
*
*  \return The interpolated value.
*/
S16 interpol_s16_s16(struct interpol_s16_s16_obj const* me, S16 value);

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
 *                          Copyright 2007-2018 Linde Material Handling. All rights reserved.                           *
 ***********************************************************************************************************************/
